package com.hehui.partimejob;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.RelativeLayout;

public class SearchActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_search;
    }

    @SuppressLint("ResourceAsColor")
    @Override
    public void init() {
        getNavView().setTitle(R.string.search).isShowBack(true);
        EditText editText = new EditText(this);
        editText.setHint(R.string.search);
        editText.setBackground(getDrawable(R.drawable.et_bg));
        editText.setHintTextColor(R.color.pri_gray);
        RelativeLayout nav = getNavView().getNav();
        nav.removeViewAt(1);
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(1200, ViewGroup.LayoutParams.WRAP_CONTENT);
        layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
        layoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
        nav.addView(editText, 1,layoutParams);
    }
}